package cloud.lysky.java.on.jvm;

public class LoaderDemo {
    public static String a = "aaa";

    public static void main(String[] args) {
        // 类加载器测试
        // 尝试获取当前类的类加载器
        ClassLoader classLoader = LoaderDemo.class.getClassLoader();
        System.out.println("classLoader = " + classLoader);

        // 获取classLoader的父加载器
        ClassLoader parentClassLoader = classLoader.getParent();
        System.out.println("parent = " + parentClassLoader);

        // 获取classLoader父加载器的父加载器
        System.out.println("grant parent = " + parentClassLoader.getParent());

    }
}